<template>
  <!-- 首页广告没登录啥都没有 -->
  <!-- <div v-login="false">首页自定义v-islogin</div> -->

  <!-- <loginDialogEE ></loginDialogEE> -->
  <!-- <button @click="btn">测试全局组件</button> -->
  <div class="indexHomeBox">
    <div class="indexHome">
      <img :src="logo" alt="">
      <img :src="logoFont" alt="">
      <input type="text" placeholder="请输入内容" @keydown.enter="goChat">
    </div>
    <div class="button"></div>
  </div>

</template>
<script setup lang="ts">
  import logo from '@/assets/img/logo2x.png'
import logoFont from '@/assets/img/fontAi@2x.png'
import { useRouter} from 'vue-router';
const router = useRouter()

const goChat = ()=>{
  router.replace({ name:'Chat'})
}

  // 获取 vue对象是实例  由于 setup语法糖 没有this上下文 所以用getCurrentInstance获取
import { getCurrentInstance ,ComponentInternalInstance} from 'vue';
const { proxy } = getCurrentInstance() as ComponentInternalInstance

    const btn = ()=>{
      // console.log('测试', proxy);
      
      proxy?.$showLoginDialog()
    }
</script>
<style scoped lang='scss'>

.indexHomeBox{
  display: flex;
  flex-direction: column;

  .indexHome{
    flex: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content:flex-end;

  & :nth-child(1){
    width: 100px;
    height: 100px;
  }
  & :nth-child(2) {
          width: 300px;
        }
     input {
    background-color: #fff;
      border: none;
      border-radius: 36px;
      box-shadow: 0 -1px 8px #0003, 0 6px 20px #00000030;
      color: #000;
      font-family: inherit;
      font-size: 20px;
      min-height: 72px;
      outline: 0;
      padding-inline-end: 52px;
      padding-inline-start: 52px;
      width: calc(100% - 300px);
      display: flex;
      justify-content: center;
      align-items: center;
                    }
}
}

</style>
